package cn.jhz.learn.blog.test.core;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.jhz.learn.blog.common.bean.JsonData;

@RestController
@RequestMapping("/{blog_id}/article")
public class ArticleController {
	

	@PostMapping
	public JsonData submitArticle(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@DeleteMapping("/{article_id}")
	public JsonData removeArticle(@PathVariable("blog_id") String blogId, @PathVariable("article_id") Integer articleId) {
		return JsonData.success();
	}
	
	@PutMapping
	public JsonData modifyArticle(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@GetMapping("/{article_id}")
	public JsonData findArticle(@PathVariable("blog_id") String blogId, @PathVariable("article_id") Integer articleId) {
		//TODO:待设计VO
		return JsonData.success();
	}
}
